from api.huobi.HuobiAPI import HBiAPI

class huobigateway:
    def __init__(self):
        self.filePath_write = ''  # 保存文件的路径
        self.filePath_read = ''  # 文件读取路径

    #----------------------------------------------------------------------------
    def connet(self):
        '''连接交易所'''
        pass

    # -----------------------------------------------------------------------------------------
    def writeLog(self, log, FILE_NAME):
        '''日志写入'''
        GATE_LOG_PATH = FILE_NAME  # 这里应该统一把变量放到一个文件内
        f = open(self.filePath_write + GATE_LOG_PATH, 'a')
        f.write(log)
        f.close()

    # ------------------------------------------------------------------------------------------
    def loadData(self, FILE_NAME, data):
        '''保存数据到指定文件夹'''
        f = open(self.filePath_write + FILE_NAME, 'a')
        f.write(data)
        f.close()

    # ------------------------------------------------------------------------------------------
    def readData(self, FILE_NAME):
        '''从数据储存位置读取数据'''
        f = open(self.filePath_write + FILE_NAME, 'r')
        f.read()  # 这里存疑，记得验证
        f.close()

    #--------------------------------------------------------------------------------------------
    def buy(self):
        '''买进'''
        pass

    #--------------------------------------------------------------------------------------------
    def sellf(self):
        '''卖出'''
        pass

    #---------------------------------------------------------------------------------------------
    def cancelOrder(self):
        '''取消订单'''
        pass